package com.java.business.controller;

import com.java.business.model.PurchaseBill;
import com.java.business.service.PurchaseBillService;
import com.java.common.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 订单采购
 */
@RestController
@RequestMapping("/purchaseBill")
public class PurchaseBillController {

    @Autowired
    private PurchaseBillService purchaseBillService;

    @PostMapping("/list")
    public Result list(@RequestBody PurchaseBill purchaseBill) {
        return purchaseBillService.list(purchaseBill);
    }

    @PostMapping("/save")
    public Result save(@RequestBody PurchaseBill purchaseBill) {
        return purchaseBillService.save(purchaseBill);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody PurchaseBill purchaseBill) {
        return purchaseBillService.modify(purchaseBill);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return purchaseBillService.remove(ids);
    }
}
